Release 10.1A: OpenEdge Development:
ADM and SmartObjects
Update operations and the RowObjUpd temp-table
SmartDataObject update operations require an additional Progress temp-table called RowObjUpd. This temp-table, a copy of the RowObject temp-table, is used for handling all types of changes to data rows: updating existing rows, adding rows, and deleting rows:
- When an existing row is updated, Progress creates in RowObjUpd a before image of the row; that is, the row with its original row values, as it appeared before the update. When the update is committed, the updated version of the row also is written to the RowObjUpd table. The server-side code uses the before image to verify that the row’s data was not changed by another user since it was read, then uses the new values to update the database.
- When a row is added and the add is committed, the new row is written to the RowObjUpd table.
- When a row is deleted, the deleted row is removed from the RowObject table and written to the RowObjUpd table to be passed to the server.
The SmartDataObject transfers updated and newly added rows back to the database when it receives a Commit request. Depending on how the SmartDataObject’s
AutoCommitproperty is set, the commit can be performed either automatically when an update is received (the default behavior) or when a specific Commit request is received after a set of updates are made. The default behavior is the typical usage; however, to change to the nondefault behavior, set the SmartDataObject’sAutoCommitproperty toNO. For details, see the "Commit SmartPanel" section.When a change is committed, the RowObjUpd temp-table is passed back to the server (if the SmartDataObject is divided between client and AppServer), and the code in
serverCommitreads the table and makes the appropriate changes to the database. For details, see the field description ofRowModin the "Nondata fields in the RowObject and RowObjUpd temp-tables" section.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |